package com.baizhi.service.impl;

import com.baizhi.dao.UserDao;
import com.baizhi.entity.User;
import com.baizhi.service.UserService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao ud;

    @Override
    public boolean login(String email, String pwd) {
        QueryWrapper qw=new QueryWrapper();
        qw.eq("email",email);
        qw.eq("password",pwd);
        User user = ud.selectOne(qw);
        if (user==null){
            return false;
        }
        return true;
    }
}
